<template>
  <div>
    <MessageItem :msg="msg" />
    {{ message }}
  </div>
</template>
  
  <script>
    import MessageItem from './components/MessageItem.vue'
    
    export default {
      name: 'App',
      components: {
        MessageItem
      },
      data() {
        return {
          message: 'Simple Spring Boot Vue application',
          msg: ''
        };
      },
      mounted() {
        fetch('/api/hello')
          .then((response) => response.text())
          .then((data) => {
          console.log(data);
          this.msg = data;
        });
      }
    }
  </script>
  
  <style>
    #app {
      font-family: sans-serif;
      text-align: center;
      color: #1b76d1;
    }
  </style>
